Enums and Dtos
AccountTypes Enum
Defines account access levels by numeric ID.
| Enum Key | Value | Description |
|---|---|---|
ADMIN | 1 | Administrator account with full privileges. |
REGULAR | 2 | Regular user account with standard privileges. |
STEALTH | 3 | Stealth account with restricted or hidden access. |
CreateNotificationServiceDto
DTO used to create a new Notification Service.
| Property | Type | Validation | Description |
|---|---|---|---|
name | string | @IsNotEmpty() @IsString() | The name of the notification service. Must be a non-empty string. |
Validation
@IsNotEmpty(): Ensures thenamefield is provided and is not empty.@IsString(): Ensures thenamefield is a string.
CreateNotificationPreferenceDto
DTO used to create or update a Notification Preference.
| Property | Type | Validation | Description |
|---|---|---|---|
customerId | number | @IsInt(), @IsNotEmpty() | ID of the customer for whom the preference is set. |
notificationServiceId | number | @IsInt(), @IsNotEmpty() | ID of the notification service related to the preference. |
notificationType | NotificationType (enum) | @IsEnum(NotificationType), @IsNotEmpty() | Type/category of notification (e.g., email, SMS). |
reason | string (optional) | @IsOptional(), @IsString() | Optional reason for the preference setting or change. |
status | NotificationPreferenceStatus (enum) | @IsEnum(NotificationPreferenceStatus), @IsNotEmpty() | Status of the preference (e.g., enabled, disabled). |
Validation Rules
@IsInt(): Ensures the property is an integer.@IsNotEmpty(): Ensures the property is provided and not empty.@IsEnum(): Ensures the value is a valid member of the given enum.@IsOptional(): Property is optional; validation applies only if the property is present.@IsString(): Ensures the property is a string.
Related Enums
- NotificationType: Defines the types of notifications (e.g., EMAIL, SMS).
- NotificationPreferenceStatus: Defines statuses such as OPTED_IN or OPTED_OUT.